import { request } from '@/api/service'

export default {
  getBloodList (params) {
    return request({
      url: '/api/blood/page',
      method: 'get',
      params
    })
  },
  addBlood (data) {
    return request({
      url: '/api/blood/add',
      method: 'post',
      data
    })
  },
  updateBlood (data) {
    return request({
      url: '/api/blood/edit',
      method: 'post',
      data
    })
  },
  deleteBlood (id) {
    return request({
      url: '/api/blood/delete',
      method: 'post',
      data: {
        id
      }
    })
  },
  // 血液入库
  getInRepository (data) {
    return request({
      url: '/api/reposin/rk',
      method: 'post',
      data
    })
  },
  // 血液出库
  getOutRepository (data) {
    return request({
      url: '/api/reposout/ck',
      method: 'post',
      data
    })
  },
  // 获得仓库列表
  getRepositoryList (params) {
    return request({
      url: '/api/repository/page',
      method: 'get',
      params
    })
  },
  getVolunteerList (params) {
    return request({
      url: '/api/volunteer/page',
      method: 'get',
      params
    })
  }
}
